//
//  UIButton+YMJbutton.m
//  02-UIViewController
//
//  Created by dllo on 16/7/15.
//  Copyright © 2016年 YMJ. All rights reserved.
//

#import "UIButton+YMJbutton.h"

@implementation UIButton (YMJbutton)
+ (UIButton *)createYMJbuttonWithFrame:(CGRect)frame
                                 title:(NSString *)title
                            titleColor:(UIColor *)titleColor
                       backgroundColor:(UIColor *)backgroundColor
                             fillImage:(NSString *)fillImage
                       backgroundImage:(NSString *)backgroundImage
                                target:(id)target
                              selector:(SEL)selector {
    UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    [button setFrame:frame];
    [button setTitle:title forState:0];
    [button setTitleColor:titleColor forState:0];
    [button setBackgroundColor:backgroundColor];
    [button setImage:[UIImage imageNamed:fillImage] forState:0];
    [button setBackgroundImage:[UIImage imageNamed:backgroundImage] forState:0];
    [button addTarget:target action:selector forControlEvents:UIControlEventTouchUpInside];
    return button;
    
}
@end
